<html> 
  <head> 
    <title>html shader</title> 
    <script type="text/javascript" src="../jquery.js"></script>
    <script type="text/javascript" src="../math/point2d.js"></script>
    <script type="text/javascript" src="../math/vector2d.js"></script>
    <script id="shader-vs" type="x-shader/x-vertex">
        attribute vec3 Pos;
        uniform mat4 uMV;
        uniform mat4 uPM;
        void main(void) {
            gl_Position = uPM * uMV * vec4(Pos, 1.0);
        }
    </script>
    <script type="text/javascript">
       
        var count = 0;
        function onTimer() {
    	}
    	
     	$(document).ready( function() {
     	    var canvas = $("#myCanvas")[0];
    		if ( !canvas || !canvas.getContext)
    			return;
    		//context = canvas.getContext('2d');
    		
    		var shaderEle = $("#shader-vs");
    		console.log("%s", shaderEle.text());
    		
    		var prog = new Object();
    		var attributeName = "viewMatrix";
    		prog[attributeName] = 1;
    		console.log( prog.viewMatrix);
    		
    		//var gl = canvas.getContext( 'experimental-webgl');
    		var gl = null;
    		for ( var k in gl)
    		    console.log( gl[k]);
    		
    		// will failed
    		// var cxt2d = canvas.getContext( '2d');
    		
    		setInterval( "onTimer()", 33);

    		
    	});
		</script> 
  </head> 
  <body> 
    <canvas id="myCanvas" width="1024" height="600">
    	Your browser does not have support for Canvas.
    </canvas>
  </body> 
</html> 